home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16683 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.9 KB

  1. Path: solon.com!not-for-mail
  2. From: clgonsal@undergrad.math.uwaterloo.ca (Carl Laurence Gonsalves)
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated,comp.lang.c++
  4. Subject: Re: Is C/C++ convertor available ???
  5. Date: 11 Apr 1996 13:56:03 -0500
  6. Organization: University of Waterloo
  7. Sender: clc@solutions.solon.com
  8. Approved: clc@solutions.solon.com
  9. Message-ID: <4kjkk3$bp8@solutions.solon.com>
  10. References: <4k5vt7$a3c@solutions.solon.com> <4kcmib$ova@solutions.solon.com> <4kg88m$ig8@solutions.solon.com>
  11. NNTP-Posting-Host: solutions.solon.com
  12.  
  13. In article <4kg88m$ig8@solutions.solon.com>,
  14. William O'Hara <ohara@tiac.ent> wrote:
  15. >>You heard wrong. g++ is a C++ compiler, not a C++ to C 
  16. >translator, and it has
  17. >>no such option.
  18. >
  19. >    I DO NOT use gcc.  Yet I wouldn't doubt that 
  20. >there was a feature.. After all C++ is an extension to
  21. >C which is theortically an extension to itself. :) 
  22. >Classes and such all boil down to structures.. Don't
  23. >ever get the idea that C++ is its own language. It goes
  24. >through a tier of translation before compilation. 
  25.  
  26. AFAIK, g++ does not convert C++ into C. I converts C++, and C into an
  27. intermediate language, which the back-end then converts into the
  28. assembly/machine code of your target machine. There are other front-ends
  29. for gcc that will compile Objective-C, Modula-3, and even Ada (or so I've
  30. heard).
  31.  
  32. Saying that C++ is not its own language is just silly. It is so it's own
  33. language. The set of legal C++ programs is different than the set of legal
  34. C programs, so C++ is a distinct language from C. C++ may be almost a
  35. superset of C, but it is not equivalent. (C++ is only *almost* a superset,
  36. because there are legal C programs that are not legal C++ programs)
  37.  
  38. -- 
  39.         Carl Laurence Gonsalves - clgonsal@undergrad.math.uwaterloo.ca
  40.                    Computer Science, University of Waterloo
  41.                http://www.undergrad.math.uwaterloo.ca/~clgonsal/
  42.                    http://www.csclub.uwaterloo.ca/~clgonsal/
  43.